package com.zbl.zblproject.pay.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zbl.zblproject.erp.entity.ErpGoods;

import java.math.BigDecimal;

/**
 * @author youlanqiang
 * @version 1.0
 * @date 2018/11/5
 */
@TableName("zbl_pay_orderitem")
public class PayOrderItem {

    @TableId()
    private long id;

    /**
     * 订单号的ID
     */
    private long orderId;

    /**
     * 商品ID
     */
    private int goodsId;

    /**
     * 商品数量
     */
    private int goodsNum;

    /**
     * 折扣
     */
    private BigDecimal discount;

    /**
     * 商品单价
     */
    private BigDecimal singlePrice;

    /**
     * 商品名称
     */
    private String goodsName;

    @TableField(exist = false)
    private ErpGoods goods;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public int getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(int goodsNum) {
        this.goodsNum = goodsNum;
    }

    public BigDecimal getSinglePrice() {
        return singlePrice;
    }

    public void setSinglePrice(BigDecimal singlePrice) {
        this.singlePrice = singlePrice;
    }

    public ErpGoods getGoods() {
        return goods;
    }

    public void setGoods(ErpGoods goods) {
        this.goods = goods;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    @Override
    public String toString() {
        return "PayOrderItem{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", goodsId=" + goodsId +
                ", goodsNum=" + goodsNum +
                ", singlePrice=" + singlePrice +
                ", goods=" + goods +
                '}';
    }
}
